package com.example.money.Controller;

import com.example.money.Entity.Login;
import com.example.money.Service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;

@Controller
public class login {
    /**
     * 登陆的控制岑发
     */

    @Autowired
    private LoginService loginService;

    @PostMapping(value = "/login")
    public String login(Login login){
        boolean i=loginService.login(login);
        if (i){
            return "html/zxl/all";
        }else {
            return "html/login";
        }
    }
}
